import axios from '@/utils/request.js'

export function getCategory(id) {
        return axios({
                url: '/category',
                params: {
                        id
                }
        })
}
// 二级面包屑
/**
 * @description: 获取二级分类列表数据
 * @param {*} id 分类id
 * @return {*}
 */
export const getCategoryFilterAPI = (id) => {
        return axios({
                url:'/category/sub/filter',
                params:{
                        id
                }
        })
}
// 二级分类商品列表
/**
 * @description: 获取导航数据
 * @data {
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   }
 * @return {*}
 */
export const getSubCategoryAPI = (data) => {
        return axios({
                url:'/category/goods/temporary',
                method:'POST',
                data
        })
}
